You are here: Symbol Reference > Dew Namespace > Dew.Stats Namespace > Dew.Stats.Units Namespace > Classes > Statistics Class > Statistics Methods > Statistics.MDScaleMetric Method
Dew Stats for .NET
ContentsIndexHome
PreviousUpNext
Statistics.MDScaleMetric Method

Classical multidimensional scaling.

Syntax
C#
Visual Basic
public static void MDScaleMetric([In] TMtx D, [In] TMtx Y, [In] TVec EigenValues, [In] int NumDim);
Parameters 
Description 
[In] TMtx D 
Distance matrix. 
[In] TMtx Y 
Returns the coordinates of object in reduced space.> 
[In] TVec EigenValues 
 
[In] int NumDim 
Defines number of dimensions/variables to use in classical MD scaling algorithm. 
using Dew.Math; using Dew.Stats; using Dew.Stats.Units; namespace Dew.Examples { private void Example() { Matrix X = new Matrix(0,0); Matrix Y = new Matrix(0,0); Matrix D = new Matrix(0,0); Matrix DHat = new Matrix(0,0); Vector eigen = new Vector(0); X.SetIt(5,2,false,new double[] {1,2,3,4,3,11,7,8,9,4}); // Use all dimensions i.e. 2 Statistics.PairwiseDistance(X,D,2,TPWDistMethod.pwdistEuclidian); // Reduce to just one variable (1d subspace) Statistics.MDScaleMetric(D,Y,eigen,1); // Calculate estimated distance matrix Statistics.PairwiseDistance(Y,DHat,1,TPWDistMethod.pwdistEuclidian); // Calculate stress - measure of GOF double stress = Statistics.MDScaleStress(D,DHat); // if stress > 0.2, the GOF is poor. } }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!